package com.xingda.packing.dmss.minitor.controller;

import com.xingda.packing.dmss.minitor.service.MachineStatusService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/machine")
public class MachineStatus {
    @Resource
    private MachineStatusService machineStatusService;

    @GetMapping("status/{area}")
    public List<String> status(@PathVariable int area) {
        return machineStatusService.status(area);
    }
}
